# -Try to find Arpack
#
#
# The following are set after configuration is done: 
#  ARPACK_FOUND
#  ARPACK_LIBRARIES

SET(ARPACK_POSSIBLE_LIBPATHS
  /usr/lib
  /usr/local/lib
  /usr/lib64
  /usr/local/lib64
  )

FIND_LIBRARY(ARPACK_LIBRARIES 
  NAMES arpack 
  PATHS ${ARPACK_POSSIBLE_LIBPATHS}
  )

#MESSAGE("DBG ARPACK_LIBBRARIES=${ARPACK_LIBRARIES})

IF(NOT ARPACK_LIBRARIES)
  MESSAGE(SEND_ERROR "Arpack library not found.")
ENDIF(NOT ARPACK_LIBRARIES)

IF(ARPACK_LIBRARIES)
  MESSAGE(STATUS "Found Arpack library")
  SET(ARPACK_FOUND TRUE)
ELSE(ARPACK_LIBRARIES)
  SET(ARPACK_FOUND FALSE)
ENDIF(ARPACK_LIBRARIES)

MARK_AS_ADVANCED(
  ARPACK_LIBRARIES
  ARPACK_FOUND
  )